|
|
 |
|
|
|
|
If Month(DTPicker7.Value) = 4 Then
CallbackDate = CDate("08/" & strDayYear)
Else
CallbackDate = CDate("04/" & strDayYear)
End If
Case "S"
CallbackDate = CDate("09/" & strDayYear)
Case "O"
CallbackDate = CDate("10/" & strDayYear)
Case "N"
CallbackDate = CDate("11/" & strDayYear)
Case "D"
CallbackDate = CDate("12/" & strDayYear)
End Select
Debug.Print Now
End Sub |
|
|
|
|
|
|
|
|
Using the Day, Year, and Month properties, you can figure out which month is currently selected. You then use that month and the key that was pressed to calculate the next month to return back in the CallbackDate argument. Once you return the value in the CallbackDate argument, this value is placed in the Value property, which then causes the Format event to fire. Here, you can return MonthName into the location of the X characters in the CustomFormat property. Heres the code: |
|
|
|
 |
|
|
|
|
Private Sub DTPicker7_Format(_
ByVal CallbackField As String, _
FormattedString As String)
FormattedString = MonthName(Month(DTPicker7.Value))
End Sub |
|
|
|
|
|
|
|
|
Of course, the FormatSize event will also be called. Heres the code for that event, just to be complete: |
|
|
|
 |
|
|
|
|
Private Sub DTPicker7_FormatSize(_
ByVal CallbackField As String, _
Size As Integer)
Size = 9
End Sub |
|
|
|
|
|